package repository.archetypes
import  repository.artefact.details.*
import  repository.artefact.*

class ArchetypeService {
    static expose=['xfire']
    String RELATIVE_PATH = "repository/archetypes"
    String EXTENSION = ".adl"
    
    def artefactService
    
    static transactional = true
      
    JerarquiaDetallesArtefacto getJerarquiaDetallesArtefacto() {
        artefactService.relativePath = RELATIVE_PATH
        artefactService.extension = EXTENSION
        JerarquiaDetallesArtefacto jerarquia = artefactService.getJerarquiaDetallesArtefacto()
        
        return jerarquia
    }
    
    Arquetipo getArquetipo(String n, String v, String p) {        
        artefactService.relativePath = RELATIVE_PATH
        artefactService.extension = EXTENSION
        Artefacto artefacto = artefactService.get(n,v,p,new Arquetipo())  
        
        return artefacto
    } 
}

